{  Problem: http://codeforces.ru/problemset/problem/96/A
	  Verdict: Accepted
}
uses
        SysUtils, Math;

var
        s:string;

begin
readln(S);
if (pos('0000000',s) > 0) or (pos('1111111',s) > 0) then write('YES') else
        write('NO');
end.